home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / LAYOUT.PAK / LAYDIA.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  83 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1993, 1995 by Borland International, All Rights Reserved
  4. //----------------------------------------------------------------------------
  5. #if !defined(LAYDIA_H)
  6. #define LAYDIA_H
  7.  
  8. #if !defined(OWL_DIALOG_H)
  9. # include <owl/dialog.h>
  10. #endif
  11. class _OWLCLASS TEdit;
  12. class _OWLCLASS TComboBox;
  13. class _OWLCLASS TListBox;
  14.  
  15. #define WM_SET_X (WM_USER + 100)
  16.  
  17. const int MaxWindows = 10;
  18.  
  19. struct TChildInfo {
  20.   TWindow*       Child;
  21.   TLayoutMetrics LayoutMetrics;
  22. };
  23.  
  24. //
  25. // class TLayoutDialog
  26. // ~~~~~ ~~~~~~~~~~~~~
  27. class TLayoutDialog : public TDialog {
  28.   public:
  29.     TLayoutDialog(TLayoutWindow* parent, TResId resId, TChildInfo* info);
  30.     enum Constraint { X1, X2, Y1, Y2};
  31.  
  32.   protected:
  33.     char*          Title;
  34.     TLayoutWindow* LayoutWindow;
  35.  
  36.     void    SetupWindow();
  37.     void    HandleLayout();
  38.     void    HandleWindowChange();
  39.  
  40.     void    SetLayoutConstraint(TLayoutConstraint& lc, Constraint which);
  41.     void    GetLayoutConstraint(TLayoutConstraint& lc, Constraint which);
  42.  
  43.     TChildInfo* ChildInfo;
  44.     int         ChildNum;
  45.  
  46.     TListBox*  WindowList;
  47.  
  48.     TComboBox* X1EdgeCombo;
  49.     TComboBox* X2EdgeCombo;
  50.     TComboBox* Y1EdgeCombo;
  51.     TComboBox* Y2EdgeCombo;
  52.  
  53.     TComboBox* X1OtherEdgeCombo;
  54.     TComboBox* X2OtherEdgeCombo;
  55.     TComboBox* Y1OtherEdgeCombo;
  56.     TComboBox* Y2OtherEdgeCombo;
  57.  
  58.     TComboBox* X1UnitsCombo;
  59.     TComboBox* X2UnitsCombo;
  60.     TComboBox* Y1UnitsCombo;
  61.     TComboBox* Y2UnitsCombo;
  62.  
  63.     TEdit*     X1ValueEdit;
  64.     TEdit*     X2ValueEdit;
  65.     TEdit*     Y1ValueEdit;
  66.     TEdit*     Y2ValueEdit;
  67.  
  68.     TComboBox* X1RelationCombo;
  69.     TComboBox* X2RelationCombo;
  70.     TComboBox* Y1RelationCombo;
  71.     TComboBox* Y2RelationCombo;
  72.  
  73.     TComboBox* X1RelWinCombo;
  74.     TComboBox* X2RelWinCombo;
  75.     TComboBox* Y1RelWinCombo;
  76.     TComboBox* Y2RelWinCombo;
  77.  
  78.   DECLARE_RESPONSE_TABLE(TLayoutDialog);
  79. };
  80.  
  81.  
  82. #endif
  83.